<%= link_to t('navigation.home'), home_path, 
	class: "nav_tab #{ 'nav_tab_active' if current_tab_name == 'home' }" %>
<%= link_to t('navigation.archive'), archive_path, 
	class: "nav_tab #{ 'nav_tab_active' if current_tab_name == 'archive' }" %>

<div class="<%= current_tab_name %>_line"></div>

<div id="navigation_entries">
    <ul>
	<% if current_tab_name == 'archive'%>
		<% Category.roots.sort_by { |c| c.order_position }.each do |cat| %>		
			<li class="nav_entry <%= selected_category?(cat) ? 'nav_entry_active' : ''%>">
				<%= link_to cat.name, cat %>
			</li>
			
			<%  if selected_category?(cat) and cat.children.present? %>
				<ul id="sub_navigation_entries">
					<% cat.children.sort_by { |c| c.order_position }.each do |subcat| %>
						<li class="nav_entry <%= selected_category?(subcat) ? 'sub_nav_entry_active' : ''%>">
							<%= link_to subcat.name, subcat %>
						</li>
					<% end %>
				</ul>
			<% end %>
			
		<% end %>
	<% else %>
		<% home_tab_menu_entries.each do |entry| %>
			<li class="nav_entry <%= current_page?(entry[1]) ? 'nav_entry_active' : ''%>">
				<%= link_to entry[0], entry[1] %>
			</li>
		<% end %>
	<% end %>	
    </ul>
</div>

